package crm.impl;

import java.util.List;

import javax.annotation.Resource;

import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.orm.hibernate4.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;

import crm.dao.UserDao;
import crm.entity.SysUs;

@Repository
public class UserDaoimpl extends HibernateDaoSupport implements UserDao {
	
	
	 @Resource  
	    public void setMySessionFactory(SessionFactory sessionFactory){  
	        super.setSessionFactory(sessionFactory);  
	    } 
	
	

	@Override
	public List getlogin(SysUs sysus) {
		// TODO Auto-generated method stub
		return getHibernateTemplate().find("from SysUs where usrBh=? and usrPassword=?",
				new Object[]{sysus.getUsrBh(),sysus.getUsrPassword()});
	}



	



	



}
